package com.pc.mapper;

import com.pc.enrty.ShoppingTrolley;
import com.pc.pojo.Cart;

import java.util.ArrayList;

public interface ShoppingTrolleyMapper {
    /**
     * 根据uid或者商品查询购物车
     * @param
     * @return ShoppingTrolley
     */
    ArrayList<Cart> selectByUidAndFid(Cart cart);

    /**
     * 新增购物车
     * @param shoppingTrolley
     * @return
     */
    int insertTrolley(ShoppingTrolley shoppingTrolley);

    /**
     * 根据uid和fid修改数量
     * @param shoppingTrolley
     * @return
     */
    int updateByUidAndFid(ShoppingTrolley shoppingTrolley);

    /**
     * 根据uid和fid删除商品
     * @param shoppingTrolley
     * @return
     */
    int deleteByUidAndFid(ShoppingTrolley shoppingTrolley);


    ArrayList<Cart> selectByUidAndFid2(ShoppingTrolley shoppingTrolley);

    ArrayList<Cart> selectOutFid(ShoppingTrolley shoppingTrolley);
}
